﻿#ifndef TIANYU_SERVER_MSG_
#define TIANYU_SERVER_MSG_

#include "proxy_head.h"


class CProxySocketMsg
{
public:
	CProxySocketMsg()
	{
		clear();
	}
	void clear()
	{
		head_.clear();
		msg_.clear();
		fd_ = 0;
	}
	CProxySocketMsg(const ::common::CProxyHead& head, const std::string& msg, int32_t fd)
	{
		head_.Copy(head);
		msg_ = msg;
		fd_ = fd;
	}
	void SetMsg(const ::common::CProxyHead& head, const std::string& msg, int32_t fd)
	{
		head_.Copy(head);
		msg_ = msg;
		fd_ = fd;
	}
	void Copy(const CProxySocketMsg& msg)
	{
		head_.Copy(msg.head_);
		msg_ = msg.msg_;
		fd_ = msg.fd_;
	}
	~CProxySocketMsg() {}
public:
	::common::CProxyHead head_;
	std::string msg_;
	int32_t fd_;
};

#endif 